package com.powernode.factory.method;

/**
 * 简单工厂模式
 */
public class Factory {

    public static WeaponFactory get(String fact){
        if("DaggerFactory".equals(fact)){
            return new DaggerFactory();
        }else if("GunFactory".equals(fact)){
            return new GunFactory();
        }else {
            throw new RuntimeException("没有这个工厂！");
        }
    }
}
